from django.urls import path, include, re_path
from api.view.sms import TencentSmsCodeAPIView
from api.view.account import LoginRegisterAPIView
from api.view.business import TemporaryKeyAPIView, ReleaseAPIView, TopicListAPIView, IndexListAPIView, \
    IndexDetailsListAPIView, CommentAPIView, ThumbsUpReleaseAPIView, ThumbsUpCommentAPIView, FansFollowAPIView, \
    FanDetailAPIView, FollowDetailAPIView

from api.view.auction import AuctionListAPIView, AuctionItemListAPIView, AuctionItemDetailAPIView
from api.view.pay import PaymentView, MoneyTypeAPIView, NotifyView, AuctionItemPriceAPIView, OrderAPIView, \
    PayOrderAPIView

urlpatterns = [
    # 发送短信
    path('tencent_sms/', TencentSmsCodeAPIView.as_view()),
    # 登录注册
    path('login_register/', LoginRegisterAPIView.as_view()),
    # cos临时密钥
    path('temporary_key/', TemporaryKeyAPIView.as_view()),
    # 发布保存视图
    path('release/', ReleaseAPIView.as_view()),
    # 返回话题
    path('topic/', TopicListAPIView.as_view()),
    # 返回首页
    path('index/', IndexListAPIView.as_view()),
    # 返回首页详情
    re_path(r'index/detail/(?P<pk>\d+)/$', IndexDetailsListAPIView.as_view()),
    # 评论添加/获取更多的评论
    path('comment/', CommentAPIView.as_view()),
    # 文章点赞处理(接口未开放)
    re_path(r'thumbs/up/release/(?P<pk>\d+)/$', ThumbsUpReleaseAPIView.as_view()),
    # 动态点赞处理
    re_path(r'thumbs/up/comment/(?P<pk>\d+)/$', ThumbsUpCommentAPIView.as_view()),
    # 关注取关处理
    re_path(r'fans/(?P<pk>\d+)/$', FansFollowAPIView.as_view()),
    # 关注者详细
    path('follow/detail/', FollowDetailAPIView.as_view()),
    # 粉丝详细
    path('fan/detail/', FanDetailAPIView.as_view()),
    # 拍卖场列表
    path('auction/list/', AuctionListAPIView.as_view()),
    # 拍卖商品列表
    re_path(r'auction/item/(?P<pk>\d+)/$', AuctionItemListAPIView.as_view()),
    # 拍卖商品详细
    re_path(r'auction/item/detail/(?P<pk>\d+)/$', AuctionItemDetailAPIView.as_view()),
    # 充值返回
    path('money/type/', MoneyTypeAPIView.as_view()),
    # 充值路由
    path('payment/', PaymentView.as_view()),
    # 支付成功之后回调
    path('pay/notify/', NotifyView.as_view()),
    # 最高价格&&竞价
    path('get/price/', AuctionItemPriceAPIView.as_view()),
    # 订单渲染
    path('get/order/', OrderAPIView.as_view()),
    # 订单支付
    path('pay/order/', PayOrderAPIView.as_view()),
]
